package net.pec.geotools_svg.svg_conversion;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.w3c.dom.Element;
import org.w3c.dom.Document;

public class GenerateMapLayer {
private List featureElements = new ArrayList();

	public Element createMapLayer(String id, Document svgDoc){
		Element gLayerElement = svgDoc.createElementNS("http://www.w3.org/2000/svg", "g");
		gLayerElement.setAttribute("id", id);
		
		Iterator featureIt = featureElements.iterator();		
		while(featureIt.hasNext()){
			Element featureElement = (Element) featureIt.next();
			gLayerElement.appendChild(featureElement);
		}
		return gLayerElement;
	}

	public void addFeatureElements(Element featureElement) {
		featureElements.add(featureElement);
	}

	
}
